package com.jiazimall.coupon.controller;

import com.wujiahao.common.utils.R;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RefreshScope
@RestController
@RequestMapping("coupon/coupon")
public class CouponController {
    @Value("${coupon.user.name}")
    private String name;
    @Value("${coupon.user.age}")
    private String age;
    @GetMapping("/test/config")
    public void testConfig(){
        System.out.println(name+": "+age);
    }
    @RequestMapping("/member/list")
    public void memberCoupons(){
        System.out.println("远程调用！");
    }
    @RequestMapping("/list/tree")
    public R list() {
        return R.ok().put("data", null);
    }
}
